/*
 * 登录页面样式文件 - Login Page Styles
 * 定义登录表单、布局、响应式设计等样式
 */

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-image: url('https://iiiu-assets-images.oss-cn-beijing.aliyuncs.com/assets/SaraPic.png');
    background-size: auto 100%;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #FFE5EC;
    padding: 20px;
    position: relative;
    overflow: hidden;
    
    // 渐变蒙版层 - 轻柔透明，让背景更清晰
    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(
            135deg,
            rgba(255, 182, 193, 0.12) 0%,
            rgba(255, 218, 224, 0.08) 25%,
            rgba(173, 216, 230, 0.08) 50%,
            rgba(221, 160, 221, 0.1) 75%,
            rgba(255, 192, 203, 0.12) 100%
        );
        z-index: 1;
        animation: gradient-shift 15s ease infinite;
    }

    // 第二层蒙版 - 非常轻柔的白色层
    &::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: radial-gradient(
            circle at 50% 50%,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.12) 100%
        );
        z-index: 2;
    }

    // 浮动粒子容器
    .floating-particles {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 3;
        pointer-events: none;
        overflow: hidden;

        .particle {
            position: absolute;
            background: rgba(255, 255, 255, 0.6);
            border-radius: 50%;
            animation: float-up 20s linear infinite;

            &:nth-child(1) {
                width: 8px;
                height: 8px;
                left: 10%;
                animation-delay: 0s;
                animation-duration: 15s;
            }

            &:nth-child(2) {
                width: 12px;
                height: 12px;
                left: 20%;
                animation-delay: 2s;
                animation-duration: 18s;
            }

            &:nth-child(3) {
                width: 6px;
                height: 6px;
                left: 30%;
                animation-delay: 4s;
                animation-duration: 12s;
            }

            &:nth-child(4) {
                width: 10px;
                height: 10px;
                left: 50%;
                animation-delay: 1s;
                animation-duration: 20s;
            }

            &:nth-child(5) {
                width: 8px;
                height: 8px;
                left: 70%;
                animation-delay: 3s;
                animation-duration: 16s;
            }

            &:nth-child(6) {
                width: 14px;
                height: 14px;
                left: 85%;
                animation-delay: 5s;
                animation-duration: 14s;
            }
        }
    }

    // 波浪蒙版层
    .wave-overlay {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 150px;
        z-index: 4;
        pointer-events: none;

        .wave {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-size: auto 100%;
            background-position: left bottom;
            background-repeat: repeat-x;
            opacity: 0.5;

            &.wave1 {
                background-image: url('https://iiiu-assets-images.oss-cn-beijing.aliyuncs.com/assets/bannerWave1.png');
                animation: wave-move 15s linear infinite;
                opacity: 0.5;
            }

            &.wave2 {
                background-image: url('https://iiiu-assets-images.oss-cn-beijing.aliyuncs.com/assets/bannerWave2.png');
                animation: wave-move 20s linear infinite reverse;
                opacity: 0.35;
            }
        }
    }
}

.login-card {
    width: 100%;
    max-width: 450px;
    // 增强毛玻璃效果 - 更加梦幻
    backdrop-filter: blur(30px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.95) 0%,
        rgba(255, 250, 250, 0.92) 50%,
        rgba(255, 245, 250, 0.95) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
    animation: card-entrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);

    // 卡片光晕效果 - 减弱
    &::after {
        content: '';
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(
            circle,
            rgba(255, 182, 193, 0.05) 0%,
            transparent 70%
        );
        animation: glow-pulse 4s ease-in-out infinite;
        pointer-events: none;
        z-index: 0;
    }

    &:hover {
        transform: translateY(-5px);
        box-shadow: 
            0 25px 70px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.9);
        border-color: rgba(255, 255, 255, 0.7);
    }

    .ant-card-body {
        padding: 48px 32px;
        background: transparent;
        position: relative;
        z-index: 2;
    }

    // Tabs样式 - 可爱动漫风格
    .auth-tabs {
        .ant-tabs-nav {
            margin-bottom: 36px;
            
            &::before {
                border-bottom: 2px solid rgba(255, 182, 193, 0.2);
            }
        }

        .ant-tabs-tab {
            padding: 18px 8px;
            font-size: 20px;
            font-weight: 600;
            color: #999;
            border: none;
            background: transparent;
            transition: all 0.3s ease;
            position: relative;
            margin: 0 28px;
            border-radius: 0;
            letter-spacing: 0.5px;

            &:hover {
                color: #666;
            }

            &.ant-tabs-tab-active {
                color: #FF69B4;
                font-weight: 700;
            }
        }

        .ant-tabs-ink-bar {
            background: #FFB6C1;
            height: 3px;
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .ant-tabs-content {
            .ant-tabs-tabpane {
                animation: fade-in-scale 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
            }
        }
    }

    // 表单样式 - 可爱动漫风格
    .auth-form {
        .ant-form-item {
            margin-bottom: 22px;
            position: relative;
            
            .ant-form-item-label {
                display: none;
            }
        }

        .ant-input,
        .ant-input-password {
            border: none;
            border-radius: 8px;
            padding: 16px 14px;
            font-size: 15px;
            color: #5A5A7D;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.5);
            backdrop-filter: blur(10px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

            &::placeholder {
                color: #AAA;
                font-weight: 400;
            }

            .ant-input-prefix {
                margin-right: 12px;
                color: #FFB6C1;
                font-size: 18px;
                transition: all 0.3s ease;
                width: 18px;
                display: inline-flex;
                align-items: center;
                justify-content: center;
            }

            &:hover {
                background: rgba(255, 255, 255, 0.6);
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);

                .ant-input-prefix {
                    color: #FF69B4;
                }
            }

            &:focus,
            &.ant-input-focused {
                background: rgba(255, 255, 255, 0.7);
                box-shadow: 0 6px 16px rgba(255, 182, 193, 0.15);

                .ant-input-prefix {
                    color: #FF69B4;
                }
            }
        }



        // 密码可见性切换按钮样式
        .ant-input-password-icon {
            color: #FFB6C1;
            transition: all 0.3s ease;
            
            &:hover {
                color: #FF69B4;
            }
        }

        // 表单验证错误样式增强 - 可爱风格
        .ant-form-item-has-error {
            .ant-input,
            .ant-input-password {
                border-color: #ff6b9d;
                background: rgba(255, 107, 157, 0.05);
                box-shadow: 0 0 0 4px rgba(255, 107, 157, 0.1);
                
                &:focus {
                    border-color: #ff6b9d;
                    box-shadow: 
                        0 0 0 4px rgba(255, 107, 157, 0.15),
                        0 4px 12px rgba(255, 107, 157, 0.2);
                }
            }
        }

        .ant-form-item-explain-error {
            color: #ff6b9d;
            font-size: 13px;
            margin-top: 6px;
            font-weight: 500;
            animation: shake 0.5s ease, slide-in-down 0.3s ease;
        }

        .auth-button {
            background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
            border: none;
            border-radius: 16px;
            height: 52px;
            font-size: 17px;
            font-weight: 600;
            color: white;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
            margin-top: 20px;
            box-shadow: 
                0 6px 20px rgba(255, 105, 180, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
            letter-spacing: 1px;

            // 按钮光泽效果
            &::before {
                content: '';
                position: absolute;
                top: 0;
                left: -100%;
                width: 100%;
                height: 100%;
                background: linear-gradient(
                    90deg,
                    transparent 0%,
                    rgba(255, 255, 255, 0.3) 50%,
                    transparent 100%
                );
                transition: left 0.6s ease;
            }

            &:hover:not(:disabled) {
                background: linear-gradient(135deg, #FF1493 0%, #C71585 100%);
                transform: translateY(-3px) scale(1.02);
                box-shadow: 
                    0 10px 30px rgba(255, 20, 147, 0.5),
                    inset 0 1px 0 rgba(255, 255, 255, 0.4);

                &::before {
                    left: 100%;
                }
            }

            &:active:not(:disabled) {
                background: linear-gradient(135deg, #C71585 0%, #8B008B 100%);
                transform: translateY(-1px) scale(1);
                box-shadow: 
                    0 4px 15px rgba(199, 21, 133, 0.4),
                    inset 0 1px 0 rgba(255, 255, 255, 0.2);
            }

            &.ant-btn-loading {
                background: linear-gradient(135deg, #FF69B4 0%, #FF1493 100%);
                transform: none;
                
                .ant-btn-loading-icon {
                    color: white;
                    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
                }
            }

            &:disabled {
                opacity: 0.5;
                cursor: not-allowed;
                transform: none;
                box-shadow: 0 2px 8px rgba(255, 105, 180, 0.2);
            }
        }

        // 分割线样式
        .login-divider {
            margin: 28px 0;
            
            .ant-divider-inner-text {
                padding: 0 16px;
            }

            .divider-text {
                color: #999;
                font-size: 14px;
                font-weight: 500;
                background: rgba(255, 255, 255, 0.8);
                padding: 0 12px;
            }
        }

        // 第三方登录样式 - 简洁风格
        .third-party-login {
            text-align: center;
            margin-top: 20px;

            .third-party-buttons {
                display: flex;
                justify-content: center;
                gap: 16px;
                flex-wrap: wrap;
            }

            .third-party-btn {
                width: 48px;
                height: 48px;
                border: 1px solid rgba(255, 182, 193, 0.3);
                background: rgba(255, 255, 255, 0.6);
                backdrop-filter: blur(10px);
                transition: all 0.3s ease;
                position: relative;
                border-radius: 12px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

                .anticon {
                    font-size: 20px;
                    transition: all 0.3s ease;
                }

                &:hover {
                    transform: translateY(-2px);
                    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
                }

                &.wechat-btn {
                    .anticon {
                        color: #07C160;
                    }
                    
                    &:hover {
                        background: rgba(7, 193, 96, 0.1);
                        border-color: #07C160;
                    }
                }

                &.qq-btn {
                    .anticon {
                        color: #12B7F5;
                    }
                    
                    &:hover {
                        background: rgba(18, 183, 245, 0.1);
                        border-color: #12B7F5;
                    }
                }

                &.github-btn {
                    .anticon {
                        color: #24292e;
                    }
                    
                    &:hover {
                        background: rgba(36, 41, 46, 0.1);
                        border-color: #24292e;
                    }
                }

                &.alipay-btn {
                    .anticon {
                        color: #1677FF;
                    }
                    
                    &:hover {
                        background: rgba(22, 119, 255, 0.1);
                        border-color: #1677FF;
                    }
                }
            }
        }
    }
}

// 动画定义 - 可爱动漫风格
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-scale {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }
    50% {
        transform: scale(1.02) translateY(-2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes card-entrance {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    60% {
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes slide-in-down {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-3px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(3px);
    }
}

@keyframes gradient-shift {
    0% {
        opacity: 0.8;
        filter: hue-rotate(0deg);
    }
    50% {
        opacity: 1;
        filter: hue-rotate(15deg);
    }
    100% {
        opacity: 0.8;
        filter: hue-rotate(0deg);
    }
}

@keyframes rainbow-move {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 200% 50%;
    }
}

@keyframes glow-pulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes float-up {
    0% {
        bottom: -20px;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        bottom: 100vh;
        opacity: 0;
    }
}

@keyframes wave-move {
    0% {
        background-position-x: 0;
    }
    100% {
        background-position-x: 1000px;
    }
}

// 响应式设计 - 移动端优化
@media (max-width: 768px) {
    .login-container {
        padding: 16px;
        min-height: 100vh;
        align-items: center;
        padding-top: 40px;
        background-size: auto 80%;

        .wave-overlay {
            height: 120px;
        }

        .floating-particles {
            .particle {
                display: none;
            }
        }
    }

    .login-card {
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 24px;
        box-shadow: 
            0 15px 50px rgba(255, 182, 193, 0.35),
            0 8px 25px rgba(173, 216, 230, 0.25);

        .ant-card-body {
            padding: 36px 24px;
        }

        .auth-tabs {
            .ant-tabs-nav {
                margin-bottom: 28px;
            }

            .ant-tabs-tab {
                font-size: 18px;
                padding: 14px 6px;
                margin: 0 20px;
            }
        }

        .auth-form {
            .ant-form-item {
                margin-bottom: 20px;
            }

            .ant-input,
            .ant-input-password {
                height: 52px;
                font-size: 16px;
                padding: 14px 12px;
            }

            .auth-button {
                height: 50px;
                font-size: 16px;
            }

            .third-party-login {
                margin-top: 18px;

                .third-party-buttons {
                    gap: 14px;
                }

                .third-party-btn {
                    width: 48px;
                    height: 48px;
                    
                    .anticon {
                        font-size: 20px;
                    }
                }
            }

            .login-divider {
                margin: 24px 0;
                
                .divider-text {
                    font-size: 13px;
                    padding: 5px 14px;
                }
            }
        }
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 12px;
        padding-top: 30px;
        background-size: auto 75%;

        .wave-overlay {
            height: 100px;
        }
    }

    .login-card {
        border-radius: 20px;

        .ant-card-body {
            padding: 28px 20px;
        }

        .auth-tabs {
            .ant-tabs-tab {
                font-size: 17px;
                margin: 0 16px;
            }
        }

        .auth-form {
            .ant-input,
            .ant-input-password {
                height: 50px;
                font-size: 15px;
            }

            .auth-button {
                height: 48px;
                font-size: 15px;
            }

            .third-party-login {
                .third-party-buttons {
                    gap: 12px;
                }

                .third-party-btn {
                    width: 46px;
                    height: 46px;
                    border-radius: 12px;
                    
                    .anticon {
                        font-size: 19px;
                    }
                }
            }

            .login-divider {
                margin: 20px 0;
            }
        }
    }
}